package com.xinxing.city.recovery.entitys;

import android.widget.TextView;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.databinding.BindingAdapter;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.xinxing.city.recovery.BR;

@JsonIgnoreProperties(ignoreUnknown = true)
public class Catalogs extends BaseObservable {
    private String code;
    private String level;
    private String upperCode;
    private String name;
    private String icon;
    private String defaultPkgPrice;
    private String pkgCarbonValue;
    private String existLower;
    private String unitCode;
    private String unitName;
    private String idCodePrefix;
    private int num;
    private boolean show = true;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getUpperCode() {
        return upperCode;
    }

    public void setUpperCode(String upperCode) {
        this.upperCode = upperCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getDefaultPkgPrice() {
        return defaultPkgPrice;
    }

    public void setDefaultPkgPrice(String defaultPkgPrice) {
        this.defaultPkgPrice = defaultPkgPrice;
    }

    public String getPkgCarbonValue() {
        return pkgCarbonValue;
    }

    public void setPkgCarbonValue(String pkgCarbonValue) {
        this.pkgCarbonValue = pkgCarbonValue;
    }

    public String getExistLower() {
        return existLower;
    }

    public void setExistLower(String existLower) {
        this.existLower = existLower;
    }

    public String getUnitCode() {
        return unitCode;
    }

    public void setUnitCode(String unitCode) {
        this.unitCode = unitCode;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getIdCodePrefix() {
        return idCodePrefix;
    }

    public void setIdCodePrefix(String idCodePrefix) {
        this.idCodePrefix = idCodePrefix;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
    @Bindable
    public boolean isShow() {
        return show;
    }

    public void setShow(boolean show) {
        this.show = show;
        notifyPropertyChanged(BR.show);
    }
    @BindingAdapter("bucketNum")
    public static void getBucketNum(TextView view, String text){
        view.setText(text+" 个回收桶");
    }

}
